#ifndef LOGGER_H
#define LOGGER_H

#include <QObject>
#include <functional>

class Logger : public QObject
{
    Q_OBJECT
public:
    explicit Logger(QObject *parent = nullptr);
    static Logger& getSingleton();


    Logger& operator<<(const QString & info);

    const std::function<void(QString)> &getCallbackFunc() const;
    void setCallbackFunc(const std::function<void(QString)> &newCallbackFunc);

signals:

private:
    std::function<void(QString)> callbackFunc;
};

#ifndef LOG
#define LOG Logger::getSingleton()
#endif

#endif // LOGGER_H
